// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

cc.Class({
    extends: cc.Component,

    properties: {
        objItemBg:cc.Node,
        //显示关数
        labelLevelNumber:cc.Label,
        //存储数据关数
        LevelInfo:null,
    },

    setListItemInfo(itemInfo,index) {
        this.labelLevelNumber.string ="第"+(index+1)+"关";
        this.LevelInfo=itemInfo;
    },

    setIsShowLevelNumber(isShowLevelNumber){
        this.objItemBg.active = !isShowLevelNumber;
    },

    levlItemClick(){
        cc.log("点击选关  选择关卡信息"+this.LevelInfo.level);
    }
});
